package com.tec.security.controller;

import com.tec.security.utils.other.LimitPage;
import com.tec.security.utils.response.Result;
import com.tec.security.utils.security.service.UserInformationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "管理相关")
@RequestMapping("/Admin/")
public class AdminController {
    private final UserInformationService userInformationService;
    @Autowired
    public AdminController(UserInformationService userInformationService) {
        this.userInformationService = userInformationService;
    }

    @ApiOperation(value = "人员列表")
    @PostMapping("personList")
    public Result personList(String department, LimitPage limitPage){
        return userInformationService.selectPersonListByDepartment(department,limitPage);
    }
}
